<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<link rel="stylesheet" type="text/css" href="../../js/lib/theme-chalk/index.css" />
		<link rel="stylesheet" type="text/css" href="../../css/myCustomer.css" />
		<link rel="stylesheet" type="text/css" href="../../css/my_commont.css" />
		<link rel="stylesheet" type="text/css" href="index.css" />
		<script src="../../common/utilCookie.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../common/author.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../js/vue.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../js/axios.min.js"></script>
		<script src="../../js/jquery.js" type="text/javascript" charset="utf-8"></script>
		<!-- 引入组件库 -->
		<script src="../../js/lib/index.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../common/judegetEmpty.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../js/aixos-init.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../js/config.js" type="text/javascript" charset="utf-8"></script>
		<script src="index.js" type="text/javascript" charset="utf-8"></script>
		<style type="text/css">
			[v-cloak] {
				display: none;
			}
		</style>
	</head>
	<body>
		<div id="addHomeMenu" v-cloak>
			<div class="contaner" v-loading.fullscreen.lock="fullscreenLoading">
				<div class="section-header">
					商品 - 添加首页菜单
				</div>
				<hr class="hr-style" />
				<div class="my_height_20 managerContent">
					<div class="my_height_20">
						<el-form ref="form" :model="form" label-width="100px">
							<el-form-item label="logo">
								<el-upload :action="uploadUrl" :before-remove="beforeRemove" list-type="picture" :limit="1" :on-exceed="handleImgExceed"
								 :file-list="fileList" :on-success="handleImgSuccess">
									<el-button size="small" type="primary">点击上传</el-button>
								</el-upload>
							</el-form-item>
							<el-form-item label="名称">
							<el-input v-model="form.name"></el-input>
							</el-form-item>
							<el-form-item label="权重">
							<el-input v-model="form.showOrder"></el-input>
							</el-form-item>
							<el-form-item>
								<el-button type="primary" @click="commitHomeMenu">提交</el-button>
							</el-form-item>
							
						</el-form>
					</div>
				</div>
				<div class="my_height_20">
					<p class="categoryStyle">首页菜单列表</p>
					<el-table border :data="homeMenuTable" style="width: 500px">
						<el-table-column  label="logo" width="200">
							<template slot-scope="scope">
							 <el-image  :src="scope.row.logo" ></el-image>
							</template>
						</el-table-column>
						<el-table-column prop="name" label="名称">
						</el-table-column>	
						<el-table-column label="操作">
							<template slot-scope="scope">
								<el-button @click="deleteHomeMenuRow(scope.row)" type="text" size="small">
									移除
								</el-button>
								<el-button @click="editHomeMenuRow(scope.row)" type="text" size="small">
									编辑
								</el-button>
							</template>
						</el-table-column>
					</el-table>
				</div>
			     
				 <el-dialog title="编辑" :visible.sync="dialogEditFormVisible" width="400px">
				 	<el-form :model="editFrom">
				          <el-form-item label="logo:" >
				          	<el-upload ref="coverUpload" :action='uploadUrl' :before-remove="beforeCourseRemove" :file-list="carouseImgUrl"
				          	 :on-success="handleCoverSuccess" list-type="picture" :limit='1' :on-exceed="handleCoverExceed">
				          		<el-button slot="trigger" size="small" type="primary"><i class="el-icon-upload el-icon--right"></i>&nbsp;选取图片</el-button>
				          	</el-upload>
				          </el-form-item>
						  <el-form-item label="名称">
						  <el-input v-model="editFrom.name"></el-input>
						  </el-form-item>
						  <el-form-item label="权重">
						  <el-input v-model="editFrom.showOrder"></el-input>
						  </el-form-item>
				 	</el-form>
				 	<div slot="footer" class="dialog-footer">
				 		<el-button @click="dialogEditFormVisible = false">取 消</el-button>
				 		<el-button type="primary" @click="configEditUpload">确 定</el-button>
				 	</div>
				 </el-dialog>  
			</div>
  
		</div>
	</body>
</html>
